package com.thz.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author thz
 * @Date 2024/12/12
 */
@AllArgsConstructor
@Getter
public enum ResultCode {
    // 操作成功
    SUCCESS (1000, "操作成功"),

    // 服务器内部错误，友好提⽰
    ERROR (2000, "服务繁忙请稍后重试"),

    // 操作失败，但是服务器不存在异常
    FAILED (3000, "操作失败"),
    FAILED_UNAUTHORIZED (3001, "未授权"),
    FAILED_PARAMS_VALIDATE (3002, "参数校验失败"),
    FAILED_NOT_EXISTS (3003, "资源不存在"),
    FAILED_ALREADY_EXISTS (3004, "资源已存在"),
    AILED_USER_EXISTS (3005, "⽤⼾已存在"),
    FAILED_USER_NOT_EXISTS (3006, "⽤⼾不存在"),
    FAILED_LOGIN (3007, "密码错误"),
    FAILED_USER_BANNED (3008, "您已被列⼊⿊名单, 请联系管理员"),

    // 登入操作
    USER_LOGIN_IS_NULL(3201, "用户名或密码不能为空"),
    FAILED_UPDATE(3202, "更新失败"),
    FAILED_CREATE(3203, "新增失败"),
    FAILED_DELETE(3204, "删除失败"),
    ARGUMENT_REGEX(3205,"您的账号或密码复杂度太低，设置中必须包含字母、数字，特殊字符请及时修改！"),
    USER_GET_MESSAGE_ERROR(3206,"用户获取个人信息失败"),
    EMAIL_SEND_ERROR(3207, "邮箱发送失败"),
    FAILED_FREQUENT(3208, "操作频繁，请稍后重试"),
    FAILED_TIME_LIMIT(3209, "当天请求次数已达到上限"),
    FAILED_SEND_CODE(3210, "验证码发送错误"),
    FAILED_INVALID_CODE(3211, "验证码无效"),
    FAILED_ERROR_CODE(3212, "验证码错误"),
    FAILED_ERROR_EMAIL(3213, "邮箱格式错误"),



    EXAM_START_TIME_BEFORE_CURRENT_TIME(3301, "竞赛开始时间不能早于当前时间"),
    EXAM_START_TIME_AFTER_END_TIME(3302, "竞赛开始时间不能晚于竞赛结束时间"),
    EXAM_NOT_EXISTS(3303, "竞赛不存在"),
    EXAM_QUESTION_NOT_EXISTS(3304, "为竞赛新增的题目不存在"),
    EXAM_STARTED(3305, "竞赛已经开始，无法进行操作"),
    EXAM_NOT_HAS_QUESTION(3306, "竞赛当中不包含题目"),
    EXAM_IS_FINISH(3307, "竞赛已经结束不能进行操作"),
    EXAM_IS_PUBLISH(3308, "竞赛已经发布不能进行编辑、删除操作"),
    EXAM_IS_REPEAT(3309, "竞赛的题目不允许重复添加"),
    HOMEWORK_START_TIME_BEFORE_CURRENT_TIME(3310, "作业开始时间不能早于当前时间"),
    HOMEWORK_START_TIME_AFTER_END_TIME(3311, "作业开始时间不能晚于竞赛结束时间"),
    HOMEWORK_NOT_HAS_QUESTION(3312, "作业当中不包含题目"),

    USER_EXAM_HAS_ENTER(3401, "用户已经报过名，无需重复报名"),

    FAILED_FILE_UPLOAD(3501, "文件上传失败"),
    FAILED_FILE_UPLOAD_TIME_LIMIT(3502, "当天上传图片数量超过上限"),

    FAILED_FIRST_QUESTION(3601, "当前题目已经是第一题了哦"),
    FAILED_LAST_QUESTION(3602, "当前题目已经是最后一题了哦"),

    FAILED_NOT_SUPPORT_PROGRAM(3701, "当前不支持此语言"),

    FAILED_RABBIT_PRODUCE(3801, "mq生产消息异常");


    // 状态码
    private int code;
    // 描述信息
    private String msg;
}
